# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-cached-property
_pkgname=${pkgname#python-}
pkgver=1.5.2
pkgrel=10
pkgdesc='A decorator for caching properties in classes.'
arch=('any')
license=('BSD')
url='https://github.com/pydanny/cached-property'
depends=('python')
makedepends=('python-build' 'python-pip')
source=("https://github.com/pydanny/cached-property/archive/$pkgver.tar.gz")
sha512sums=('71ce8376c5d90c8e97dc91af7a9329d3645a311c7cc41cf052074989430de68b66efc17c62c6780982f500b3d09a12cb24613df7b4f1bff95cf68f6442f50d0d')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

